/*
 * LoginData.java
 * 
 * Version information
 * 
 * Feb 20, 2006
 * 
 * Copyright (c) AmSoft Systems, 2006
 */
package net.amsoft.iservice.isso.webapp.dataObject;

import java.util.ArrayList;

/**
 * @author rahul
 * 
 */
public class LoginData {

    private String sSessionCookie;
    private String sMachineCookie;
    private int iLoginAttempts;
    private boolean loginStatus;
    private String sIDPMetaDataEP;

    /** iname property */
    private String sLoggedInSynonym; // To request
    private ArrayList oaSynonyms;

    public LoginData() {
        iLoginAttempts = 0;
        sLoggedInSynonym = null;
        oaSynonyms = null;
        loginStatus = false;
    }

    public LoginData(String sLoggedInSynonym, ArrayList oaSynonyms,
            String sGlobalInumber, boolean bLoginStatus, String sSessionCookie) {
        super();
        this.sLoggedInSynonym = sLoggedInSynonym;
        this.oaSynonyms = oaSynonyms;
        this.loginStatus = bLoginStatus;
        this.sSessionCookie = sSessionCookie;
    }
    public ArrayList getSynonymList() {
        return oaSynonyms;
    }
    public void setSynonymList(ArrayList oaSynonyms) {
        this.oaSynonyms = oaSynonyms;
    }
    public String getLoggedInSynonym() {
        return sLoggedInSynonym;
    }
    public void setLoggedInSynonym(String sLoggedInSynonym) {
        this.sLoggedInSynonym = sLoggedInSynonym;
    }
    public boolean isLoginStatus() {
        return loginStatus;
    }
    public void setLoginStatus(boolean bLoginStatus) {
        this.loginStatus = bLoginStatus;
    }

    public String getSessionCookie() {
        return sSessionCookie;
    }

    public void setSessionCookie(String sessioCookie) {
        this.sSessionCookie = sessioCookie;
    }

    public String getMachineCookie() {
        return sMachineCookie;
    }

    public void setMachineCookie(String machineCookie) {
        this.sMachineCookie = machineCookie;
    }

    public int getLoginCount() {
        return this.iLoginAttempts;
    }

    public int incrementLoginAttempts() {
        iLoginAttempts += 1;
        return iLoginAttempts;
    }
    public String getIDPMetaDataEP() {
        return sIDPMetaDataEP;
    }
    public void setIDPMetaDataEP(String metaDataEP) {
        sIDPMetaDataEP = metaDataEP;
    }
}
